package com.training.collections;

import com.training.collections.vo.Employee;

public class EmployeeArray {

	public static void main(String[] args) {

		Employee[] employeeList = new Employee[4];
		Employee employee0 = new Employee("Naresh", "10");
		Employee employee1 = new Employee("Alex", "11");
		Employee employee2 = new Employee("Kalyan", "12");
		Employee employee3 = new Employee("Varshith", "13");
		
		

		employeeList[0] = employee0;
		employeeList[1] = employee1;
		employeeList[2] = employee2;
		employeeList[3] = employee3;

		for (int i = 0; i < employeeList.length; i++) {

			employeeList[i].display();

		}

	 Employee[] employeesListNew = new Employee[5];
	 
	  Employee employee4 = new Employee("Srikanth","14");
	  
	  for (int i = 0; i < employeeList.length; i++) {
		  
		  employeesListNew[i] = employeeList[i]; 
	  }
	  
	  employeesListNew[4] = employee4;
	
	  System.out.println("--------------NEW LIST -------------------");
	  for (int i = 0; i < employeesListNew.length; i++) {
		  employeesListNew[i].display();
	}
	
	}
}
